<?php
/*
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  global $mosConfig_absolute_path, $mosConfig_live_site;
  global $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db;

  $server_pos = preg_replace('/^(.+?:\/\/)(.+)$/i','$2',$mosConfig_live_site);
  $server_pos_base = preg_replace('/^(.+?)\/.+$/i','$1',$server_pos);
  $server_pos_flag = preg_replace('/^.+?(\/.+)$/i','$1',$server_pos);
  if ($server_pos_flag == $server_pos_base) { $server_pos_flag = ''; };
  if ($server_pos_flag) {
    $http_server = $server_pos_base;
  } else {
    $http_server = $server_pos;
  };

  // Define the database connection parameters

    // eg, localhost - Should NOT be EMPTY
    define('DB_SERVER',             {DB_SERVER});
    define('DB_SERVER_USERNAME',    {DB_SERVER_USERNAME});
    define('DB_SERVER_PASSWORD',    {DB_SERVER_PASSWORD});
    define('DB_DATABASE',           {DB_DATABASE});

    // 0 = MOS and OSC using different databases ( flags DB reconnects )
    // 1 = Using same database as MOS
    define('DB_SHARED',             {shared});

    // Prefix for Tables in Database
    define('DB_PREFIX',             '{prefix}');

    // Use Persistent connections?
    define('USE_PCONNECT',          '{USE_PCONNECT}');

    // Database Handler - '' for default handler or 'mysql'
    define('STORE_SESSIONS',        '{sessions}');

  // Define the webserver and path parameters
  //
  // * DIR_WS_* = Webserver directories  (virtual/URL)
  // * DIR_FS_* = Filesystem directories (local/physical)
  //

    // Enable Secure SSL for Catalog
    define('ENABLE_SSL',              false);

    // This is the URL of your PUBLIC Catalog webserver
    define('HTTP_SERVER',             'http://' . $http_server);
    define('HTTPS_SERVER',            'https://' . $http_server);

    // Absolute Server Path to WWW folder
    define('DIR_FS_HTTP_ROOT',        $mosConfig_absolute_path . '/');

    // Webserver Catalog Root Path
    define('DIR_WS_HTTP_CATALOG',     $server_pos_flag . '/');
    define('DIR_WS_HTTPS_CATALOG',    $server_pos_flag . '/');

    // How to Handle Cookies
    define('HTTP_COOKIE_DOMAIN',      $server_pos);
    define('HTTPS_COOKIE_DOMAIN',     $server_pos);
    define('HTTP_COOKIE_PATH',        DIR_FS_HTTP_ROOT . 'components/com_oscommerce/cookies/');
    define('HTTPS_COOKIE_PATH',       DIR_FS_HTTP_ROOT . 'components/com_oscommerce/cookies/');

  //-- DO NOT MODIFY BELOW THIS LINE -----------------------------------------------------------------------

    define('DIR_FS_CATALOG',          DIR_FS_HTTP_ROOT . 'components/com_oscommerce/');
      define('DIR_FS_DOWNLOAD',         DIR_FS_CATALOG . 'download/');
      define('DIR_FS_DOWNLOAD_PUBLIC',  DIR_FS_CATALOG . 'pub/');

    define('DIR_WS_CATALOG',          'components/com_oscommerce/');

    define('DIR_WS_IMAGES',           DIR_WS_CATALOG . 'images/');
      define('DIR_WS_ICONS',            DIR_WS_IMAGES . 'icons/');

    define('DIR_WS_INCLUDES',         DIR_WS_CATALOG . 'includes/');
      define('DIR_WS_BOXES',            DIR_WS_INCLUDES . 'boxes/');
      define('DIR_WS_FUNCTIONS',        DIR_WS_INCLUDES . 'functions/');
      define('DIR_WS_CLASSES',          DIR_WS_INCLUDES . 'classes/');
      define('DIR_WS_MODULES',          DIR_WS_INCLUDES . 'modules/');
      define('DIR_WS_LANGUAGES',        DIR_WS_INCLUDES . 'languages/');

    define('DIR_WS_DOWNLOAD_PUBLIC',  'pub/');
    
    //v1.1.7
    // CLR 020605 defines needed for Product Option Type feature.
  define('PRODUCTS_OPTIONS_TYPE_SELECT', 0);
  define('PRODUCTS_OPTIONS_TYPE_TEXT', 1);
  define('PRODUCTS_OPTIONS_TYPE_RADIO', 2);
  define('PRODUCTS_OPTIONS_TYPE_CHECKBOX', 3);
  define('PRODUCTS_OPTIONS_TYPE_TEXTAREA', 4);
  define('TEXT_PREFIX', 'txt_');
  define('PRODUCTS_OPTIONS_VALUE_TEXT_ID', 0);  //Must match id for user defined "TEXT" value in db table TABLE_PRODUCTS_OPTIONS_VALUES
?>